@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Inter:wght@300;400;600;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --dark: #0f172a;
    --light: #f8fafc;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

body[dir="ltr"] {
    font-family: 'Inter', sans-serif;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.loader-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
}

.spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--primary);
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--secondary);
    animation-direction: reverse;
    animation-duration: 1.5s;
}

.spinner:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: var(--accent);
    animation-duration: 2s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--dark);
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -50px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 1rem 5%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.logo > a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* صورة الشعار في الهيدر - شفاف بدون خلفية */
.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: transparent;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* تصغير الشعار لما النافبار يصغر بعد ال scroll */
nav.scrolled .logo-img {
    height: 48px;
}




.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

html[dir="ltr"] .nav-links a::after {
    left: auto;
    right: 0;
}

.nav-links a:hover::after {
    width: 100%;
}

.lang-switch {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--light);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-switch:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.lang-switch-icon {
    display: inline-block;
    animation: spin-globe 6s linear infinite;
}

.lang-switch:hover .lang-switch-icon {
    animation-duration: 1.5s;
}

@keyframes spin-globe {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .lang-switch-icon {
        animation: none;
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: relative;
    width: 30px;
    height: 25px;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--light);
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle span:nth-child(3) {
    bottom: 0;
}

.menu-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 50px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    position: relative;
    overflow: visible;
}

.animated-content {
    min-height: 300px;
}

.typed-text {
    display: inline;
    border-left: 3px solid var(--primary);
    padding-left: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--primary); }
    51%, 100% { border-color: transparent; }
}

.hero-text h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 45px;
}

.hero-text p {
    font-size: 1.3rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    transition: all 0.4s ease;
    z-index: -1;
}

.social-icon i {
    transition: all 0.4s ease;
    z-index: 1;
}

.social-icon:hover {
    transform: translateY(-8px) scale(1.1);
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.social-icon:hover::before {
    width: 100%;
    height: 100%;
}

.social-icon:hover i {
    color: white;
    transform: scale(1.2);
}

.social-icon.linkedin::before { background: #0077b5; }
.social-icon.github::before { background: #333; }
.social-icon.instagram::before { 
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.social-icon.facebook::before { background: #1877f2; }
.social-icon.twitter::before { background: #1da1f2; }

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: float-image 6s ease-in-out infinite;
}

@keyframes float-image {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: float-shapes 15s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    right: 10%;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    bottom: 20%;
    left: 10%;
    animation-delay: 2s;
}

@keyframes float-shapes {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

/* Section Styles */
section {
    padding: 100px 5%;
    position: relative;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: #94a3b8;
}

/* Services Section */
.services-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: #94a3b8;
    line-height: 1.8;
}

/* Portfolio Section */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 2rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.portfolio-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    height: 400px;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    color: #94a3b8;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--gradient);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

html[dir="ltr"] .modal-close {
    right: auto;
    left: 1rem;
}

.modal-close:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content p {
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Skills Section */
.skills-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(10deg);
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Certificates Section */
.certificates-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.certificate-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.certificate-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.certificate-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    transition: transform 0.3s ease;
}

.certificate-card:hover .certificate-icon {
    transform: scale(1.1) rotate(-5deg);
}

.certificate-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.certificate-card p {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 0.5rem;
}

.certificate-date {
    color: var(--primary);
    font-weight: 600;
    text-align: center;
}

/* Certificate Gallery Modal */
.cert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.cert-modal.active {
    opacity: 1;
    visibility: visible;
}

.cert-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-image-wrapper {
    position: relative;
    width: 100%;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.5);
    border: 2px solid var(--primary);
    object-fit: contain;
    transition: transform 0.3s ease;
}

.cert-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.cert-nav-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.cert-prev { left: 20px; }
.cert-next { right: 20px; }

.cert-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--light);
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

html[dir="ltr"] .cert-close { 
    right: auto; 
    left: 0; 
}

.cert-close:hover { 
    color: var(--secondary); 
    transform: rotate(90deg) scale(1.2);
}

#certTitle {
    margin-top: 1.5rem;
    color: #fff;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Contact Section */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--primary);
    transform: translateX(-10px);
}

html[dir="ltr"] .contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--light);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Success Message */
.success-message {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid #10b981;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 1rem;
    color: #10b981;
    font-weight: 600;
    animation: slideIn 0.5s ease;
}

.success-message.show {
    display: flex;
}

.success-message i {
    font-size: 1.8rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
/* Footer Styles */
footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #fff;
    padding: 60px 0 0;
    margin-top: auto;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #f59e0b);
}

[dir="ltr"] .footer-section h3::after {
    right: auto;
    left: 0;
}

.footer-section p {
    line-height: 1.8;
    color: #94a3b8;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #667eea;
    transform: translateX(-5px);
}

[dir="ltr"] .footer-links a:hover {
    transform: translateX(5px);
}

.footer-links i {
    margin-left: 8px;
    font-size: 14px;
    color: #ec4899;
}

[dir="ltr"] .footer-links i {
    margin-left: 0;
    margin-right: 8px;
}

/* Social Media */
.footer-section .social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-section .social-links a {
    width: 45px;
    height: 45px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-section .social-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Contact Info in Footer */
footer .contact-info {
    list-style: none;
}

footer .contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

footer .contact-info i {
    color: #ffffff;
    font-size: 18px;
    min-width: 25px;
}

/* Newsletter */
.newsletter-form {
    display: flex;
    margin-top: 20px;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    color: #f8fafc;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: #64748b;
}

.newsletter-form input:focus {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.newsletter-form button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding: 25px 0;
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    font-size: 14px;
}

.footer-bottom a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #ec4899;
}

/* Language Toggle */
.lang-toggle {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lang-toggle:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }

    footer {
        padding: 40px 0 0;
    }

    .footer-section h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .footer-section .social-links {
        justify-content: center;
    }

    .footer-section h3::after {
        right: 50%;
        transform: translateX(50%);
    }

    [dir="ltr"] .footer-section h3::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .footer-section h3 {
        text-align: center;
    }
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
    color: white;
    border: none;
}

html[dir="ltr"] .scroll-top {
    left: auto;
    right: 30px;
}

.scroll-top.show {
    opacity: 1;
}

.scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

/* ============================================
   RESPONSIVE DESIGN - TABLET (768px - 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .hero-text h2 {
        font-size: 2.8rem;
    }
    
    .gradient-text {
        font-size: 35px;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 2.5rem;
    }
    
    .services-grid,
    .portfolio-grid,
    .certificates-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Navigation */
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 80px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        transition: right 0.3s ease;
        gap: 1.5rem;
        align-items: flex-start;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }

    html[dir="ltr"] .nav-links {
        right: auto;
        left: -100%;
        transition: left 0.3s ease;
    }
    
    .nav-links.active {
        right: 0;
    }

    html[dir="ltr"] .nav-links.active {
        left: 0;
    }

    /* خط فاصل بين روابط التنقل وزر اللغة في قائمة الموبايل */
    .nav-links li:last-child {
        width: 100%;
        margin-top: 0.5rem;
        padding-top: 1.2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .menu-toggle {
        display: flex;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo-img {
        height: 42px;
    }

    nav.scrolled .logo-img {
        height: 38px;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 5% 40px;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }
    
    .hero-image img {
        max-width: 350px;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .gradient-text {
        font-size: 28px;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .animated-content {
        min-height: 250px;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
    
    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    /* Sections */
    section {
        padding: 60px 5%;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    /* Portfolio */
    .portfolio-filters {
        gap: 0.8rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item {
        height: 300px;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.4rem;
    }
    
    /* Skills */
    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .skill-card {
        padding: 1.5rem;
    }
    
    .skill-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    /* Certificates */
    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Certificate Modal */
    .cert-modal {
        padding: 10px;
    }
    
    .cert-image-wrapper {
        height: 50vh;
    }
    
    .cert-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .cert-prev { left: 5px; }
    .cert-next { right: 5px; }
    
    .cert-close {
        top: -50px;
        font-size: 2rem;
    }
    
    #certTitle {
        font-size: 1.2rem;
    }
    
    /* Contact */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        flex-direction: row;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 2rem 1.5rem;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
    
    /* Buttons */
    .whatsapp-btn,
    .scroll-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
    }
    
    .whatsapp-btn {
        left: 20px;
        font-size: 24px;
    }
    
    .scroll-top {
        right: 20px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Navigation */
    nav {
        padding: 1rem 4%;
    }
    
    .logo {
        font-size: 1.3rem;
    }

    .logo-img {
        height: 36px;
    }

    nav.scrolled .logo-img {
        height: 32px;
    }

    .menu-toggle{
        width: 20px;
        height: 17px;
    }
    
    .nav-links {
        width: 90%;
        padding: 1.5rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 90px 4% 30px;
    }
    
    .hero-image img {
        max-width: 280px;
    }
    
    .hero-text h2 {
        font-size: 1.7rem;
    }
    
    .gradient-text {
        font-size: 24px;
    }
    
    .hero-text p {
        font-size: 0.95rem;
    }
    
    .animated-content {
        min-height: 200px;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        gap: 1rem;
    }
    
    /* Sections */
    section {
        padding: 50px 4%;
    }
    
    .section-title {
        margin-bottom: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 1.7rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
    }
    
    /* Services */
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    /* Portfolio */
    .portfolio-item {
        height: 250px;
    }
    
    .portfolio-overlay {
        padding: 1.5rem;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.2rem;
    }
    
    .portfolio-overlay p {
        font-size: 0.9rem;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.8rem;
    }
    
    /* Skills */
    .skills-container {
        gap: 1rem;
    }
    
    .skill-card {
        padding: 1.2rem;
    }
    
    .skill-icon {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
    
    .skill-card h3 {
        font-size: 1rem;
    }
    
    /* Certificates */
    .certificate-card {
        padding: 1.5rem;
    }
    
    .certificate-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .certificate-card h3 {
        font-size: 1.1rem;
    }
    
    /* Certificate Modal */
    .cert-image-wrapper {
        height: 40vh;
    }
    
    .cert-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .cert-prev { left: 2px; }
    .cert-next { right: 2px; }
    
    #certTitle {
        font-size: 1rem;
        margin-top: 1rem;
    }
    
    /* Contact */
    .contact-item {
        padding: 1.2rem;
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item h4 {
        font-size: 1rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 1.5rem 1rem;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
    }
    
    .modal-content p {
        font-size: 0.9rem;
    }

    #modalTitle{
        text-align: center;
    }
    
    /* Buttons */
    .whatsapp-btn {
        width: 45px;
        height: 45px;
        left: 15px;
        bottom: 15px;
        font-size: 22px;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        right: 15px;
        bottom: 15px;
    }
    
    /* Loading Screen */
    .loader-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .loading-text {
        font-size: 1.2rem;
    }
}

/* ============================================
    LANDSCAPE ORIENTATION FIX
   ============================================ */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 5% 40px;
    }

    .hero-content {
        gap: 2rem;
    }

    .animated-content {
        min-height: auto;
    }

    .cert-image-wrapper {
        height: 80vh;
    }
}

/* ============================================
   ✨ GLASSMORPHISM ENHANCEMENTS ✨
   ============================================ */

/* خلفية متحركة بتدرجات لونية فاخرة */
.bg-animation {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.3), transparent),
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(236, 72, 153, 0.15), transparent),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(99, 102, 241, 0.2), transparent),
        var(--dark);
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 25s linear infinite;
    opacity: 0.4;
    z-index: 0;
}

.bg-animation::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    filter: blur(60px);
    animation: orbMove 18s ease-in-out infinite;
    z-index: 0;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

@keyframes orbMove {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(300px, 200px); }
    50% { transform: translate(700px, 400px); }
    75% { transform: translate(200px, 600px); }
}

/* كرات زجاجية متحركة في الخلفية */
body::before {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    filter: blur(80px);
    animation: orbMove2 22s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    filter: blur(70px);
    animation: orbMove3 28s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes orbMove2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-200px, -300px) scale(1.2); }
    66% { transform: translate(-400px, 100px) scale(0.9); }
}

@keyframes orbMove3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-300px, 200px) scale(1.3); }
}

/* تحسين النافبار - زجاج أنيق */
nav {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav.scrolled {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(200%) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

/* تحسين بطاقات الخدمات - تأثير زجاجي فاخر */
.service-card {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.06),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
}

.service-card:hover::before {
    left: 100%;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(236, 72, 153, 0.5), rgba(245, 158, 11, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 20px 60px rgba(99, 102, 241, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* تحسين بطاقات المهارات */
.skill-card {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
    pointer-events: none;
}

.skill-card:hover::before {
    width: 300px;
    height: 300px;
}

.skill-card:hover {
    transform: translateY(-12px) scale(1.05);
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow:
        0 20px 50px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* تحسين بطاقات الشهادات */
.certificate-card {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(15px);
}

.certificate-card:hover::before {
    opacity: 0.5;
}

.certificate-card:hover {
    transform: translateY(-12px) scale(1.03);
    background: rgba(255, 255, 255, 0.07) !important;
    box-shadow:
        0 20px 50px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* تحسين عناصر التواصل */
.contact-item {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow:
        0 15px 40px rgba(99, 102, 241, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* تحسين فورم التواصل - زجاج فاخر */
.contact-form {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 2.5rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(99, 102, 241, 0.1),
        transparent,
        rgba(236, 72, 153, 0.1),
        transparent
    );
    animation: rotateGlow 8s linear infinite;
    z-index: -1;
    opacity: 0.5;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
}

.form-group input:hover,
.form-group textarea:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--primary) !important;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.15),
        0 0 30px rgba(99, 102, 241, 0.2) !important;
}

/* رسالة الخطأ */
.error-message {
    background: rgba(239, 68, 68, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 1rem;
    color: #ef4444;
    font-weight: 600;
    animation: slideIn 0.5s ease;
}

.error-message.show {
    display: flex;
}

.error-message i {
    font-size: 1.8rem;
}

/* تحسين أزرار الفلتر */
.filter-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
}

.filter-btn.active {
    background: var(--gradient) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* تحسين عناصر البورتفوليو */
.portfolio-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.portfolio-item:hover {
    transform: translateY(-10px) !important;
    box-shadow:
        0 20px 50px rgba(99, 102, 241, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.3);
}

.portfolio-overlay {
    background: linear-gradient(to top,
        rgba(15, 23, 42, 0.95),
        rgba(15, 23, 42, 0.7) 50%,
        transparent) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* تحسين النافذة المنبثقة */
.modal-content {
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* تحسين زر إغلاق المودال */
.modal-close {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* تحسين شعار الواتساب */
.whatsapp-btn {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: whatsappPulse 2s ease-in-out infinite;
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4),
                    0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6),
                    0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* تحسين زر الرجوع للأعلى */
.scroll-top {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* تأثير لمعان للأزرار */
.btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
    transform: translateY(-4px);
}

/* تأثير الجاذبية للصورة الشخصية */
.hero-image {
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: heroGlow 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes heroGlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-image img {
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(99, 102, 241, 0.3) !important;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* تأثير glow للأيقونات الاجتماعية */
.social-icon {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* أيقونات سيرفيس مع توهج */
.service-icon,
.skill-icon,
.certificate-icon,
.contact-icon {
    box-shadow:
        0 8px 25px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    position: relative;
}

.service-icon::after,
.skill-icon::after,
.certificate-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: var(--gradient);
    border-radius: inherit;
    filter: blur(10px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.service-card:hover .service-icon::after,
.skill-card:hover .skill-icon::after,
.certificate-card:hover .certificate-icon::after {
    opacity: 0.6;
}

/* تحسين شريط التمرير */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    border: 2px solid rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
}

/* تحديد النص */
::selection {
    background: rgba(99, 102, 241, 0.4);
    color: #fff;
}

/* تحسين زر اللغة */
.lang-switch {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.lang-switch:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* زر submit في حالة التحميل */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary:disabled::before {
    display: none;
}

/* تحسين الـ tags */
.tag {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* الفوتر بتأثير زجاجي */
footer {
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.8) 0%,
        rgba(30, 41, 59, 0.8) 50%,
        rgba(15, 23, 42, 0.8) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(99, 102, 241, 0.3) !important;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(99, 102, 241, 0.5),
        rgba(236, 72, 153, 0.5),
        rgba(99, 102, 241, 0.5),
        transparent);
}

/* النشرة البريدية */
.newsletter-form input {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* الفوتر social links بزجاج */
.footer-section .social-links a {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* رسالة النجاح بتأثير افضل */
.success-message {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow:
        0 8px 25px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* تحسين شاشة التحميل */
.loading-screen {
    background:
        radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--dark) 0%, #1e293b 100%) !important;
}

/* ============================================
   💼 EXPERIENCE TIMELINE SECTION
   ============================================ */
.experience-timeline {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

/* الخط العمودي اللي بيوصل بين كل الخبرات */
.experience-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: linear-gradient(180deg,
        transparent,
        rgba(99, 102, 241, 0.5) 10%,
        rgba(236, 72, 153, 0.5) 50%,
        rgba(245, 158, 11, 0.5) 90%,
        transparent);
    border-radius: 2px;
    z-index: 0;
}

.experience-item {
    position: relative;
    width: 50%;
    padding: 2rem;
    box-sizing: border-box;
    z-index: 1;
}

/* العناصر الزوجية ع اليمين (في RTL) - والفردية ع اليسار */
.experience-item:nth-child(odd) {
    margin-right: auto;
    padding-left: 4rem;
}

.experience-item:nth-child(even) {
    margin-left: auto;
    padding-right: 4rem;
}

/* في الإنجليزي - نعكس الاتجاه */
html[dir="ltr"] .experience-item:nth-child(odd) {
    margin-right: auto;
    margin-left: 0;
    padding-left: 4rem;
    padding-right: 2rem;
}

html[dir="ltr"] .experience-item:nth-child(even) {
    margin-left: auto;
    margin-right: 0;
    padding-right: 4rem;
    padding-left: 2rem;
}

/* النقطة على الخط الزمني */
.experience-marker {
    position: absolute;
    top: 3rem;
    width: 24px;
    height: 24px;
    z-index: 2;
}

.experience-item:nth-child(odd) .experience-marker {
    left: -12px;
}

.experience-item:nth-child(even) .experience-marker {
    right: -12px;
}

html[dir="ltr"] .experience-item:nth-child(odd) .experience-marker {
    left: -12px;
    right: auto;
}

html[dir="ltr"] .experience-item:nth-child(even) .experience-marker {
    right: -12px;
    left: auto;
}

.marker-dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient);
    box-shadow:
        0 0 0 4px rgba(15, 23, 42, 1),
        0 0 0 6px rgba(99, 102, 241, 0.5),
        0 0 20px rgba(99, 102, 241, 0.7);
    position: relative;
}

.marker-dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.5);
    animation: markerPulse 2s ease-out infinite;
}

@keyframes markerPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* كارت الخبرة - زجاجي فاخر */
.experience-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.8s ease;
    pointer-events: none;
}

.experience-card:hover::before {
    left: 100%;
}

.experience-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow:
        0 20px 60px rgba(99, 102, 241, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* السهم الصغير اللي بيوصل الكارت بالخط */
.experience-item:nth-child(odd) .experience-card::after,
.experience-item:nth-child(even) .experience-card::after {
    content: '';
    position: absolute;
    top: 2.5rem;
    width: 0;
    height: 0;
    border-style: solid;
}

.experience-item:nth-child(odd) .experience-card::after {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent rgba(99, 102, 241, 0.3) transparent transparent;
}

.experience-item:nth-child(even) .experience-card::after {
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent rgba(99, 102, 241, 0.3);
}

html[dir="ltr"] .experience-item:nth-child(odd) .experience-card::after {
    left: -10px;
    right: auto;
    border-width: 10px 10px 10px 0;
    border-color: transparent rgba(99, 102, 241, 0.3) transparent transparent;
}

html[dir="ltr"] .experience-item:nth-child(even) .experience-card::after {
    right: -10px;
    left: auto;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent rgba(99, 102, 241, 0.3);
}

/* هيدر الكارت - لوجو الشركة + المعلومات */
.experience-header {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.company-logo {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.experience-card:hover .company-logo {
    transform: scale(1.08) rotate(-3deg);
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-letter {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.experience-meta {
    flex: 1;
    min-width: 0;
}

.experience-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* شارة "حالياً" */
.current-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #10b981;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    -webkit-text-fill-color: #10b981;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.experience-company,
.experience-period,
.experience-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.experience-company {
    font-weight: 600;
    color: #cbd5e1;
}

.experience-company i,
.experience-period i,
.experience-location i {
    color: var(--primary);
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

.experience-description {
    color: #94a3b8;
    line-height: 1.8;
    margin: 1.2rem 0;
    font-size: 0.95rem;
}

.experience-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.2rem;
}

.exp-skill-tag {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.exp-skill-tag:hover {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* تنسيق responsive للموبايل والتابلت */
@media (max-width: 968px) {
    .experience-timeline::before {
        left: 30px;
        transform: none;
    }

    html[dir="ltr"] .experience-timeline::before {
        left: 30px;
        right: auto;
    }

    .experience-item {
        width: 100%;
        padding-left: 70px !important;
        padding-right: 1rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    html[dir="ltr"] .experience-item {
        padding-left: 70px !important;
        padding-right: 1rem !important;
    }

    .experience-item:nth-child(odd) .experience-marker,
    .experience-item:nth-child(even) .experience-marker {
        left: 18px;
        right: auto;
    }

    html[dir="ltr"] .experience-item:nth-child(odd) .experience-marker,
    html[dir="ltr"] .experience-item:nth-child(even) .experience-marker {
        left: 18px;
        right: auto;
    }

    .experience-item:nth-child(odd) .experience-card::after,
    .experience-item:nth-child(even) .experience-card::after {
        left: -10px;
        right: auto;
        border-width: 10px 10px 10px 0;
        border-color: transparent rgba(99, 102, 241, 0.3) transparent transparent;
    }
}

@media (max-width: 480px) {
    .experience-card {
        padding: 1.5rem;
    }

    .experience-header {
        flex-direction: column;
        gap: 0.8rem;
    }

    .company-logo {
        width: 60px;
        height: 60px;
    }

    .experience-title {
        font-size: 1.1rem;
    }

    .experience-item {
        padding-left: 60px !important;
    }

    .experience-timeline::before {
        left: 25px;
    }

    .experience-item:nth-child(odd) .experience-marker,
    .experience-item:nth-child(even) .experience-marker {
        left: 13px;
    }
}

/* ============================================
   🏆 NEW CERTIFICATE CARDS DESIGN
   ============================================ */

/* تعديل الجريد عشان يفسح مكان للصور البارزة */
.certificates-grid {
    padding-top: 110px !important;
    padding-bottom: 60px !important;
    gap: 5rem 3rem !important;
}

/* مسافة إضافية بعد قسم الشهادات */
#certificates {
    padding-bottom: 140px !important;
}

/* البطاقة الرئيسية - منظر زجاجي مع صورة بارزة من فوق */
.certificate-card {
    padding-top: 110px !important;
    padding-bottom: 2.5rem !important;
    overflow: visible !important;
    position: relative;
    text-align: center;
    margin-bottom: 1rem;
}

/* صورة الشهادة البارزة من فوق البطاقة */
.certificate-image-preview {
    position: absolute;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.05),
        0 0 30px rgba(99, 102, 241, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.5);
    z-index: 2;
}

.certificate-image-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        transparent 0%,
        transparent 60%,
        rgba(15, 23, 42, 0.4) 100%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.certificate-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.certificate-card:hover .certificate-image-preview {
    transform: translateX(-50%) translateY(-10px) scale(1.05);
    box-shadow:
        0 30px 70px rgba(99, 102, 241, 0.5),
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 0 50px rgba(236, 72, 153, 0.4);
    border-color: rgba(99, 102, 241, 0.5);
}

.certificate-card:hover .certificate-image-preview img {
    transform: scale(1.1);
}

.certificate-card:hover .certificate-image-preview::after {
    opacity: 0.5;
}

/* قسم معلومات الشهادة */
.certificate-info {
    margin-top: 10px;
}

.certificate-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
    text-align: center;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.certificate-info p {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
}

.certificate-info .certificate-date {
    color: var(--primary);
    font-weight: 600;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.certificate-card:hover .certificate-info .certificate-date {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.certificate-info .certificate-date i {
    animation: handPoint 1.5s ease-in-out infinite;
}

@keyframes handPoint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* إخفاء الأيقونة القديمة لو ظهرت */
.certificate-card .certificate-icon {
    display: none !important;
}

/* ============================================
   🎯 IMPROVED CERTIFICATE MODAL - X CLOSE BUTTON
   ============================================ */

/* زر إغلاق الشهادة - فوق جمب الشهادة مباشرة */
.cert-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    background: rgba(239, 68, 68, 0.9) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    font-size: 1.5rem !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease !important;
    z-index: 3010 !important;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

html[dir="ltr"] .cert-close {
    right: 20px !important;
    left: auto !important;
}

.cert-close:hover {
    background: rgba(220, 38, 38, 1) !important;
    transform: rotate(90deg) scale(1.15) !important;
    box-shadow: 0 10px 35px rgba(239, 68, 68, 0.7) !important;
    color: white !important;
}

/* ============================================
   🖱️ CUSTOM CURSOR - Modern Gradient Arrow
   ============================================ */

/* الماوس العادي - سهم بتدرج بنفسجي/وردي بدل الأبيض */
body {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><defs><linearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'><stop offset='0%25' stop-color='%236366f1'/><stop offset='50%25' stop-color='%238b5cf6'/><stop offset='100%25' stop-color='%23ec4899'/></linearGradient><filter id='s' x='-50%25' y='-50%25' width='200%25' height='200%25'><feDropShadow dx='0.5' dy='1' stdDeviation='1' flood-color='%23000' flood-opacity='0.4'/></filter></defs><path d='M 4 3 L 4 21 L 9 17 L 12.5 24 L 15.5 23 L 12 16 L 18 16 Z' fill='url(%23g)' stroke='white' stroke-width='1.3' stroke-linejoin='round' filter='url(%23s)'/></svg>") 4 3, auto;
}

/* ماوس Pointer (يد) - للأزرار واللينكات - بتدرج وردي/برتقالي */
a,
button,
.btn,
.service-card,
.skill-card,
.certificate-card,
.portfolio-item,
.contact-item,
.filter-btn,
.social-icon,
.menu-toggle,
.lang-switch,
.lang-toggle,
.modal-close,
.cert-close,
.cert-nav-btn,
.whatsapp-btn,
.scroll-top,
.logo,
[onclick],
label {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><defs><linearGradient id='gp' x1='0%25' y1='0%25' x2='100%25' y2='100%25'><stop offset='0%25' stop-color='%23ec4899'/><stop offset='50%25' stop-color='%23f59e0b'/><stop offset='100%25' stop-color='%23f97316'/></linearGradient><filter id='sp' x='-50%25' y='-50%25' width='200%25' height='200%25'><feDropShadow dx='0.5' dy='1' stdDeviation='1' flood-color='%23000' flood-opacity='0.4'/></filter></defs><path d='M 11 4 C 11 2.5 12 2 12.8 2 C 13.6 2 14.6 2.5 14.6 4 L 14.6 13 L 16 13 C 18 13 18.5 13.5 19.5 13.7 L 22 14.2 C 24 14.7 25 15.5 25 18 L 25 23 C 25 27 22 29 19 29 L 14 29 C 11 29 9 27 8 24.5 L 5.5 19 C 4.5 16.8 5 15 7 14.5 C 8.5 14.2 10 15 11 16.5 L 11 4 Z' fill='url(%23gp)' stroke='white' stroke-width='1.3' stroke-linejoin='round' filter='url(%23sp)'/></svg>") 12 4, pointer;
}

/* ماوس text للحقول النصية - بلون بنفسجي */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='28' viewBox='0 0 20 28'><defs><linearGradient id='gt' x1='0%25' y1='0%25' x2='0%25' y2='100%25'><stop offset='0%25' stop-color='%236366f1'/><stop offset='100%25' stop-color='%23ec4899'/></linearGradient></defs><line x1='10' y1='2' x2='10' y2='26' stroke='url(%23gt)' stroke-width='2.5' stroke-linecap='round'/><line x1='6' y1='2' x2='14' y2='2' stroke='url(%23gt)' stroke-width='2' stroke-linecap='round'/><line x1='6' y1='26' x2='14' y2='26' stroke='url(%23gt)' stroke-width='2' stroke-linecap='round'/></svg>") 10 14, text;
}

/* على الموبايل/التابلت - ارجع للماوس الافتراضي */
@media (hover: none) and (pointer: coarse) {
    body,
    a, button, .btn,
    input, textarea {
        cursor: auto !important;
    }

    a, button, .btn, [onclick] {
        cursor: pointer !important;
    }
}

/* ============================================
   ⚡ MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================ */
@media (max-width: 768px) {
    .contact-form {
        padding: 1.5rem;
    }

    /* تقليل حجم الكرات وتعطيل الحركة على الموبايل */
    body::before,
    body::after {
        width: 250px;
        height: 250px;
        animation: none !important;
        filter: blur(50px);
        opacity: 0.5;
    }

    /* تعطيل الشبكة المتحركة في الخلفية - بتشغل المعالج */
    .bg-animation::before {
        animation: none !important;
        opacity: 0.2;
    }

    .bg-animation::after {
        animation: none !important;
        filter: blur(40px);
    }

    /* تقليل blur عشان يبقى أخف على الموبايل */
    nav,
    .service-card,
    .skill-card,
    .certificate-card,
    .contact-item,
    .contact-form,
    .modal-content,
    footer {
        backdrop-filter: blur(10px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
    }

    /* تعطيل الـ rotateGlow الثقيل على فورم التواصل */
    .contact-form::before {
        animation: none !important;
        display: none;
    }

    /* تعطيل التوهج المتحرك حول الصورة الشخصية */
    .hero-image::before {
        animation: none !important;
        opacity: 0.4;
    }

    /* تخفيف حركة الكرات في الـ Hero */
    .shape {
        animation-duration: 30s !important;
    }

    /* تخفيف pulse الواتساب */
    .whatsapp-btn {
        animation: none !important;
    }

    /* الشهادات على الموبايل */
    .certificates-grid {
        padding-top: 90px !important;
        padding-bottom: 40px !important;
        gap: 6rem !important;
    }

    #certificates {
        padding-bottom: 100px !important;
    }

    .certificate-image-preview {
        height: 150px;
        top: -75px;
    }

    .cert-close {
        top: 15px !important;
        right: 15px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1.3rem !important;
    }
}

/* تحسين الأداء لمستخدمي تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* GPU acceleration للعناصر المتحركة عشان تبقى ناعمة */
.service-card,
.skill-card,
.certificate-card,
.portfolio-item,
.contact-item,
.btn,
.social-icon {
    will-change: transform;
    transform: translateZ(0);
}

@media (max-width: 480px) {
    .certificate-image-preview {
        height: 130px;
        top: -65px;
        width: 90%;
    }

    .certificate-card {
        padding-top: 85px !important;
        padding-bottom: 2rem !important;
    }

    .certificates-grid {
        padding-top: 80px !important;
        padding-bottom: 30px !important;
        gap: 5rem !important;
    }

    #certificates {
        padding-bottom: 80px !important;
    }
}

/* ============================================================
   ✨ PROFESSIONAL ENHANCEMENTS — Mohamed Ali Portfolio
   ============================================================ */

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #6366f1, #ec4899); border-radius: 3px; }
::selection { background: rgba(99,102,241,0.35); color: #fff; }
html { scroll-padding-top: 80px; }

/* ── Section alternating backgrounds ── */
#services  { background: rgba(15,23,42,0.6); }
#portfolio { background: rgba(10,17,36,1); }
#skills    { background: rgba(18,28,50,0.8); }
#certificates { background: rgba(10,17,36,1); }
#contact   { background: rgba(15,23,42,0.6); }

/* ── Section title — bar below heading ── */
.section-title {
    position: relative;
}
.section-title h2 {
    position: relative;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    border-radius: 2px;
    margin: 16px auto 0;
}

/* ── Service cards — original style restored ── */

/* ── Portfolio cards — hover-only overlay ── */
.portfolio-item {
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.06);
}
.portfolio-item::after { display: none; }

.portfolio-overlay {
    background: linear-gradient(to top,
        rgba(10,16,36,0.98) 0%,
        rgba(15,23,42,0.85) 60%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
}
.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}
.portfolio-overlay h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    transform: translateY(10px);
    transition: transform 0.35s ease;
}
.portfolio-item:hover .portfolio-overlay h3 {
    transform: translateY(0);
}
.portfolio-overlay p {
    font-size: 0.85rem;
    line-height: 1.5;
    transform: translateY(12px);
    transition: transform 0.35s ease 0.05s;
}
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}
.portfolio-tags { opacity: 0; transform: translateY(8px); transition: all 0.35s ease 0.1s; }
.portfolio-item:hover .portfolio-tags { opacity: 1; transform: translateY(0); }
.tag {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(99,102,241,0.25);
    border: 1px solid rgba(99,102,241,0.4);
    backdrop-filter: blur(4px);
}

.portfolio-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    background: #0f172a;
}
.portfolio-item:hover video {
    transform: scale(1.1);
}

.lock-badge {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    z-index: 3;
    border: 1px solid rgba(255,255,255,0.15);
}

.view-badge {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 3;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.view-badge:hover {
    background: rgba(99, 102, 241, 0.85);
    transform: translateX(-50%) translateY(-2px);
}

/* ── Skill cards — accent top bar ── */
.skill-card {
    border-top: 3px solid transparent;
    background-image:
        linear-gradient(rgba(30,41,59,0.5), rgba(30,41,59,0.5)),
        linear-gradient(90deg, #6366f1, #ec4899);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.skill-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 48px rgba(99,102,241,0.3);
}
.skill-icon {
    box-shadow: 0 8px 24px rgba(99,102,241,0.35);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.skill-card:hover .skill-icon {
    transform: scale(1.15) rotate(8deg);
}

/* ── Contact items — better hover ── */
.contact-item {
    border-right: 3px solid transparent;
    transition: all 0.3s ease;
}
html[dir="ltr"] .contact-item { border-right: none; border-left: 3px solid transparent; }
.contact-item:hover {
    transform: translateX(-6px);
    border-right-color: #6366f1;
    background: rgba(99,102,241,0.08);
    box-shadow: 0 8px 30px rgba(99,102,241,0.15);
}
html[dir="ltr"] .contact-item:hover {
    transform: translateX(6px);
    border-left-color: #6366f1;
    border-right: none;
}

/* ── Hero image glow ── */
.hero-image img {
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(99,102,241,0.15),
        0 30px 80px rgba(0,0,0,0.4),
        0 0 60px rgba(99,102,241,0.12);
}

/* ── Buttons — refined ── */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
    letter-spacing: 0.3px;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 44px rgba(99,102,241,0.5);
}
.btn-outline {
    position: relative;
    overflow: hidden;
    z-index: 0;
}
.btn-outline::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}
.btn-outline:hover::before { opacity: 1; }
.btn-outline:hover { color: #fff; border-color: transparent; }

/* ── Navbar — active link style ── */
.nav-links a.active { color: #6366f1; }
.nav-links a.active::after { width: 100%; }

/* ── Filter buttons ── */
.filter-btn {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}
.filter-btn::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    opacity: 0; z-index: -1;
    transition: opacity 0.3s ease;
}
.filter-btn.active::before,
.filter-btn:hover::before { opacity: 1; }
.filter-btn.active,
.filter-btn:hover { background: transparent; }

/* ── Modal — refined ── */
.modal-content {
    border: 1px solid rgba(99,102,241,0.25);
    box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 60px rgba(99,102,241,0.15);
}

/* ── Social icons — tighter hover ── */
.social-icon {
    border: 1.5px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
}
.social-icon:hover {
    transform: translateY(-6px) scale(1.08);
    box-shadow: 0 14px 36px rgba(0,0,0,0.35);
}

/* ── Form inputs — refined ── */
.form-group input,
.form-group textarea {
    border-radius: 12px;
    background: rgba(15,23,42,0.6);
    border: 1.5px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: #6366f1;
    background: rgba(99,102,241,0.05);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-group label {
    font-size: 0.88rem;
    color: #94a3b8;
    letter-spacing: 0.3px;
}

/* ── Loading text ── */
.loading-text {
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ── Active nav link on scroll ── */
.nav-links a { transition: color 0.2s ease; }

/* ── منع الحاجة لضغطتين على شاشات اللمس في قسم التواصل ──
   تأثيرات الـ hover بتخلي أول لمسة على الموبايل تفعّل الـ hover بس
   من غير ما تفتح الرابط، فبنلغي الـ transform على الأجهزة اللي معندهاش hover حقيقي */
@media (hover: none) {
    .contact-item:hover {
        transform: none !important;
    }
}

/* ============================================================
   🌐 Network background — same as Eng. Khaled Shaker's site
   Deep navy base, faint grid, blue/violet glow and an animated
   network of nodes, links and travelling data packets.
   ============================================================ */
body { background: #060a13; }
.bg-animation { background: #060a13; overflow: hidden; pointer-events: none; }
.bg-animation::before { display: none; }
.floating-shapes { display: none; }
.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(148,178,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148,178,255,.035) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
            mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
.bg-glow {
    position: absolute; top: -20%; right: -10%; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
    background: radial-gradient(circle, rgba(59,130,246,.22) 0%, rgba(139,92,246,.10) 35%, transparent 65%);
    filter: blur(10px);
}
html[dir="rtl"] .bg-glow { right: auto; left: -10%; }
#netCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }

/* Let the network show through every section */
#services, #skills, #contact { background: rgba(6,10,19,.35); }
#portfolio, #certificates { background: rgba(10,16,32,.55); }
